package com.yfqy.admin.domain.mapper;

import com.yfqy.admin.domain.dto.promotion.ProductPromotionDTO;
import com.yfqy.admin.domain.dto.promotion.PromotionQueryDTO;
import com.yfqy.admin.domain.entity.ProductPromotion;
import com.yfqy.admin.domain.vo.PromotionVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ProductPromotionMapper {
    int deleteByPrimaryKey(Long id);

    int insert(ProductPromotion record);

    int insertSelective(ProductPromotion record);

    ProductPromotion selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(ProductPromotion record);

    int updateByPrimaryKey(ProductPromotion record);

    List<PromotionVO> queryPromotionPage(@Param("queryDTO") PromotionQueryDTO queryDTO);

    int selectCount(@Param("dto") ProductPromotionDTO dto);

    int endPromotionBySpuId(@Param("spuId") Long spuId, @Param("currentUserId") Long currentUserId);
}